import { ImageResouse } from "./globals.slint";

export component GifView inherits Rectangle{
    background: black;

//    property <[image]> images:[ImageResouse.src];
    property <[image]> images:ImageResouse.images;
    private property <image> image:images[0];
    private property <int> index:0;
    Image {
        source: image;
    }

    Timer {
        interval: 0.01s;
        running: true;
        triggered => {
            if(index == images.length){
                index = 0;
            }
            image = images[index];
            index+=1;
        }
    }

}